<?php
use yii\widgets\ActiveForm;

$form=ActiveForm::begin(
    ['options'=>[
        'enctype'=>'multipart/form-data'
    ],
        'method'=>'post',
        //还有action可以改
    ]
);

?>

<?=$form->field($model,'path')->textInput(['maxlength' => 20,'name'=>"文件"]);?>
<?=$form->field($model,'imageFile')->fileInput()?>

<button>Submit</button>


<?php ActiveForm::end(); ?>















